package ar.edu.unicen.pladema.ui.mywidgets;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;

import ar.edu.unicen.pladema.resources.ResourceManager;
import ar.edu.unicen.pladema.ui.panel.AbstractPanel;

public class ElapsedPanel extends AbstractPanel {
	private Group group;
	private Label valueLabel;
	
	public ElapsedPanel(Composite parent) {
		super(parent);
	}

	@Override
	protected void createWidgets() {
		group = new Group(this, SWT.SHADOW_ETCHED_IN);
		valueLabel = new Label(group, SWT.NONE);

		group.setText(ResourceManager.getInstance().getText("ELAPSED_TITLE"));
	}

	@Override
	protected void layoutWidgets() {
		this.setLayout(new FillLayout());
		group.setLayout(new FillLayout());
	}
	public void setValue(String e) {
		this.valueLabel.setText(e + "s");
	}
}
